package com.atguigu.feign;

import com.atguigu.entity.CartInfo;
import com.atguigu.entity.PaymentInfo;
import com.atguigu.enums.PaymentType;
import com.atguigu.result.RetVal;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

@FeignClient(value = "shop-payment")
public interface PaymentFeignClient {
    //4.关闭交易接口 http://127.0.0.1:8005/payment/closeAlipayTrade/28
    @GetMapping("/payment/closeAlipayTrade/{orderId}")
    public boolean closeAlipayTrade(@PathVariable Long orderId);

    //5.查询阿里内部订单信息 http://127.0.0.1:8005/payment/queryAlipayTrade/28
    @GetMapping("/payment/queryAlipayTrade/{orderId}")
    public boolean queryAlipayTrade(@PathVariable Long orderId);

    //获取PaymentInfo
    @GetMapping("/payment/getPaymentInfo/{outTradeNo}")
    public PaymentInfo getPaymentInfo(@PathVariable String outTradeNo);

    //6.查询阿里内部订单信息 http://127.0.0.1:8005/payment/queryAlipayTrade/28
    @GetMapping("/payment/queryAlipayTradeStatus/{orderId}")
    public RetVal queryAlipayTradeStatus(@PathVariable Long orderId);
}
